/**
 * @file main.cpp
 *
 * Archivo con la función main().
 */

#include <cstdlib>
#include <iostream>

#include "GameManager.h"
#include "IntroState.h"
#include "PlayState.h"
#include "PauseState.h"
#include "EndState.h"

#define UNUSED_VARIABLE(x) (void)x

using namespace std;

int main(int argc, char* argv[])
{
  PlayState* playState = new PlayState();
  IntroState* introState = new IntroState();
  PauseState* pauseState = new PauseState();
  EndState* endState = new EndState();
  GameManager* game = new GameManager();

  // Inicia el juego y cambia al estado de introducción (IntroState).
  try {
    game->start(introState); }

  catch (const Ogre::Exception& e) {
    std::cerr << "An exception has occured: " << e.getFullDescription() << endl; }

  delete game;
  delete endState;
  delete pauseState;
  delete introState;
  delete playState;

  std::exit(0);
}
